package org.xyl.model;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 诊断结果模型
 */
public class DiagnosisResult {

    /**
     * 诊断ID
     */
    private String diagnosisId;

    /**
     * 诊断时间
     */
    private LocalDateTime diagnosisTime;

    /**
     * 主要问题代码
     */
    private String mainProblemCode;

    /**
     * 主要问题描述
     */
    private String mainProblemDescription;

    /**
     * 问题置信度
     */
    private double confidenceScore;

    /**
     * 所有可能的问题列表
     */
    private List<Problem> potentialProblems;

    /**
     * 推荐解决方案
     */
    private String recommendedSolution;

    /**
     * 故障排除步骤
     */
    private List<String> troubleshootingSteps;

    /**
     * 诊断详情
     */
    private Map<String, Object> diagnosisDetails;

    // Getter and Setter methods
    public String getDiagnosisId() {
        return diagnosisId;
    }

    public void setDiagnosisId(String diagnosisId) {
        this.diagnosisId = diagnosisId;
    }

    public LocalDateTime getDiagnosisTime() {
        return diagnosisTime;
    }

    public void setDiagnosisTime(LocalDateTime diagnosisTime) {
        this.diagnosisTime = diagnosisTime;
    }

    public String getMainProblemCode() {
        return mainProblemCode;
    }

    public void setMainProblemCode(String mainProblemCode) {
        this.mainProblemCode = mainProblemCode;
    }

    public String getMainProblemDescription() {
        return mainProblemDescription;
    }

    public void setMainProblemDescription(String mainProblemDescription) {
        this.mainProblemDescription = mainProblemDescription;
    }

    public double getConfidenceScore() {
        return confidenceScore;
    }

    public void setConfidenceScore(double confidenceScore) {
        this.confidenceScore = confidenceScore;
    }

    public List<Problem> getPotentialProblems() {
        return potentialProblems;
    }

    public void setPotentialProblems(List<Problem> potentialProblems) {
        this.potentialProblems = potentialProblems;
    }

    public String getRecommendedSolution() {
        return recommendedSolution;
    }

    public void setRecommendedSolution(String recommendedSolution) {
        this.recommendedSolution = recommendedSolution;
    }

    public List<String> getTroubleshootingSteps() {
        return troubleshootingSteps;
    }

    public void setTroubleshootingSteps(List<String> troubleshootingSteps) {
        this.troubleshootingSteps = troubleshootingSteps;
    }

    public Map<String, Object> getDiagnosisDetails() {
        return diagnosisDetails;
    }

    public void setDiagnosisDetails(Map<String, Object> diagnosisDetails) {
        this.diagnosisDetails = diagnosisDetails;
    }

    /**
     * 问题详情内部类
     */
    public static class Problem {
        private String problemCode;
        private String description;
        private double probability;

        // Getter and Setter methods
        public String getProblemCode() {
            return problemCode;
        }

        public void setProblemCode(String problemCode) {
            this.problemCode = problemCode;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public double getProbability() {
            return probability;
        }

        public void setProbability(double probability) {
            this.probability = probability;
        }
    }
}
